﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RuEn;

namespace TestingRule
{
    public class TestBO : BaseBusinessObject<TestBO>
    {
        public TestBO()
        {
        }

        [RequiredStringRule("Address Missing")]
        public string Address
        {
            get; set;
        }

        [RequiredStringRule("Enter your Name")]
        [RegExRule(@"\w+\@\w+\.com")]
        [LengthRule(20, 2)]
        [ComparerStringRule("hi","Name is not Hi", ComparerEnum.Equel)]
        public string Name
        {
            get;
            set;
        }

        [ObjectCollectionRule("Friend contains duplicate items.")]
        public List<MyC> Friends
        {
            get;
            set;
        }

    }
}
